package com.boil.qz.safekavass.web.request.param;

import com.boil.util.Constants;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * Created by ChenYong on 2016-09-21.
 * <br>
 * DataTables 专用的简单分页参数。
 */
public class SimplePage2Param extends DateParam {
    /**
     * 开始记录数
     */
    @NotNull(message = "开始记录数不能为空")
    @Range(min = Constants.VALUE_L_0, max = Long.MAX_VALUE, message = "开始记录数在0至9223372036854775807之间")
    protected Long iDisplayStart;
    /**
     * 每页记录数
     */
    @NotNull(message = "每页记录数不能为空")
    @Range(min = Constants.VALUE_0, max = Constants.VALUE_100, message = "每页记录数在0至100之间")
    protected Integer iDisplayLength;

    /**
     * 默认构造器
     */
    public SimplePage2Param() {
        super();
    }

    public Long getiDisplayStart() {
        return iDisplayStart;
    }

    public void setiDisplayStart(Long iDisplayStart) {
        this.iDisplayStart = iDisplayStart;
    }

    public Integer getiDisplayLength() {
        return iDisplayLength;
    }

    public void setiDisplayLength(Integer iDisplayLength) {
        this.iDisplayLength = iDisplayLength;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("SimplePage2Param{");
        sb.append("startDate='").append(startDate).append('\'');
        sb.append(", iDisplayStart=").append(iDisplayStart);
        sb.append(", endDate='").append(endDate).append('\'');
        sb.append(", iDisplayLength=").append(iDisplayLength);
        sb.append('}');
        return sb.toString();
    }
}